3.429 \(\int (a+a \sin (e+f x)) \, dx\)

Optimal. Leaf size=16 \[ a x-\frac{a \cos (e+f x)}{f} \]

[Out]

a*x - (a*Cos[e + f*x])/f

________________________________________________________________________________________

Rubi [A]  time = 0.0082288, antiderivative size = 16, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.1, Rules used = {2638} \[ a x-\frac{a \cos (e+f x)}{f} \]

Antiderivative was successfully verified.

[In]

Int[a + a*Sin[e + f*x],x]

[Out]

a*x - (a*Cos[e + f*x])/f

Rule 2638

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int (a+a \sin (e+f x)) \, dx &=a x+a \int \sin (e+f x) \, dx\\ &=a x-\frac{a \cos (e+f x)}{f}\\ \end{align*}

Mathematica [A]  time = 0.0064691, size = 27, normalized size = 1.69 \[ \frac{a \sin (e) \sin (f x)}{f}-\frac{a \cos (e) \cos (f x)}{f}+a x \]

Antiderivative was successfully verified.

[In]

Integrate[a + a*Sin[e + f*x],x]

[Out]

a*x - (a*Cos[e]*Cos[f*x])/f + (a*Sin[e]*Sin[f*x])/f

________________________________________________________________________________________

Maple [A]  time = 0.007, size = 17, normalized size = 1.1 \begin{align*} ax-{\frac{\cos \left ( fx+e \right ) a}{f}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(a+a*sin(f*x+e),x)

[Out]

a*x-a*cos(f*x+e)/f

________________________________________________________________________________________

Maxima [A]  time = 1.12515, size = 22, normalized size = 1.38 \begin{align*} a x - \frac{a \cos \left (f x + e\right )}{f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+a*sin(f*x+e),x, algorithm="maxima")

[Out]

a*x - a*cos(f*x + e)/f

________________________________________________________________________________________

Fricas [A]  time = 1.02352, size = 38, normalized size = 2.38 \begin{align*} \frac{a f x - a \cos \left (f x + e\right )}{f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+a*sin(f*x+e),x, algorithm="fricas")

[Out]

(a*f*x - a*cos(f*x + e))/f

________________________________________________________________________________________

Sympy [A]  time = 0.158875, size = 19, normalized size = 1.19 \begin{align*} a x + a \left (\begin{cases} - \frac{\cos{\left (e + f x \right )}}{f} & \text{for}\: f \neq 0 \\x \sin{\left (e \right )} & \text{otherwise} \end{cases}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+a*sin(f*x+e),x)

[Out]

a*x + a*Piecewise((-cos(e + f*x)/f, Ne(f, 0)), (x*sin(e), True))

________________________________________________________________________________________

Giac [A]  time = 1.29333, size = 23, normalized size = 1.44 \begin{align*} a x - \frac{a \cos \left (f x + e\right )}{f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+a*sin(f*x+e),x, algorithm="giac")

[Out]

a*x - a*cos(f*x + e)/f